import socket

def main():
    # create an udp socket
    udp_socket = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)

    # get data from the keyboard
    send_data = input("Please enter the data you want send:")

    # use socket transceiver
    # udp_socket.sendto(b'-------hhhhhhh--------', ('192.168.101.18', 9000))
    udp_socket.sendto(send_data.encode("utf-8"), ("192.168.101.18", 8080))

    # close socket
    udp_socket.close()


if __name__ == "__main__":
    main()